



import 'dart:ui';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';


main()=> runApp(CLMyapp());

class CLMyapp extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
        home: CLbody()
    );
  }
}


class CLbody extends StatelessWidget{

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return
      Scaffold(
        appBar: AppBar(
          title:Text("按钮") ,
        ),
        body:  CLbodycontent(),
        floatingActionButton: FloatingActionButton(
          child: Icon(Icons.add),
          onPressed: (){
            print('jh');
          },
        ),


      );
  }
}
class CLbodycontent extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return _CLbodycontentState();
  }
}

class _CLbodycontentState extends State<CLbodycontent> {


  @override
  Widget build(BuildContext context) {
    return ButtonTheme(//变小包裹该组件
      height: 30,
      minWidth: 30,
      child: FlatButton(onPressed: (){},
          padding: EdgeInsets.all(0),
          color: Colors.red,
          materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
          child:Text("hi",
            style: TextStyle(color: Colors.black),)),
    )
    ;
  }
}
